#include "../../../include/online/WebPageSearcher.hpp"

// g++ WebPageTest.cpp WebPage.cpp -o test

using namespace std;

#if 0
void test1(){
    //const char* filename = 
    ifstream f("WebPageTest.dat");
    stringstream buffer;
    buffer << f.rdbuf();
    string file_contents = buffer.str();

    cout << "file contents:" << endl;
    cout << file_contents << endl << endl;

    WebPage wp(file_contents);
    cout << endl;

    // cout << wp.getDocId() << endl;
    // cout << wp.getTitle() << endl;

    wp.getWordsMap();
}
#endif

void test2(){
    WebPageSearcher wps("清明", nullptr);
    wps.doQuery();
}

int main(){
    test2();
    return 0;
}
